package com.elong.qadev.action;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.springframework.beans.factory.annotation.Autowired;

import com.elong.qadev.service.UserServiceI;

/**
 * 
* @ClassName: TestAction
* @Description: TODO(使用convention-plugin插件提供的@Action注解将一个普通java类标注为一个可以处理用户请求的Action
 *         使用convention-plugin插件提供的@Namespace注解为这个Action指定一个命名空间)
* @author kangchen
* @date 2015年9月8日
*
 */
@ParentPackage("all")
@Action(value = "strust2Test")
@Namespace("/")
public class TestAction {
	public Logger log = Logger.getLogger(TestAction.class);
	/**
	 * 注入userService
	 */
	@Autowired
	private UserServiceI userService;

	/**
	 * http://localhost:8080/ti/strust2Test!test.action MethodName: test
	 * Description:
	 * 
	 * @author kang.chen
	 */
	public void test() {
		log.info("begain to do testaction");
		userService.test();
	}
}
